<%@page import="multiface.awwadco.jpa.Utente"%>
<%@page import="multiface.web.util.PagerList"%>
<%@page import="javax.persistence.Query"%>
<%@page import="java.util.LinkedList"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page import="javax.persistence.RollbackException"%>
<%@page import="javax.persistence.EntityManager"%>
<%@page import="javax.persistence.Persistence"%>
<%@page import="javax.persistence.EntityManagerFactory"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
    Utente ut = (Utente) session.getAttribute("user");
    if (ut != null) {
        response.sendRedirect(multiface.web.util.ServletUtils.getBaseUrl(request) + "/admin/index.jsp?err=y");
    }
%>

<script type="text/javascript">
    $(document).ready(function(){
        $("#formBox").validate();
    });
</script>



<div class="box">
    <form class="formBox" id="formBox" method="post" action="">
        <div class="title">Add New Administrator</div>
        <br>

        <div class="inputs">
            <label for="nome">Name</label>
            <input name="nome" id="nome" maxlength="255" class="required" type="text"/>
        </div>

        <div class="inputs">
            <label for="cognome">Surname</label>
            <input name="cognome" id="cognome" maxlength="255" class="required" type="text"/>
        </div>

        <div class="inputs">
            <label for="user">Username</label>
            <input name="user" id="user" maxlength="255" class="required" type="text"/>
        </div>

        <div class="inputs">
            <label for="password">Password</label>
            <input name="password" id="password" maxlength="255" class="required" type="password"/>
        </div>

        <%--<div class="inputs">
            <label for="tipo">Type of account</label>
            <select name="tipo" class="required" id="tipo">
                <option value="null">Select a type of account...</option>
                <option value="AMMINISTRATORE">Administrator</option>
            </select>
        </div>--%>
        <input name="tipo" id="tipo" maxlength="255" type="hidden" value="AMMINISTRATORE"/>
    </form>
</div>